import type { RouteRecordRaw } from 'vue-router'

interface M {
  readonly default: RouteRecordRaw | RouteRecordRaw[]
}
const routeMoudles = import.meta.glob<true, string, M>('./*.ts', { eager: true })

const routes = Object.values(routeMoudles).map(m => Array.isArray(m.default) ? m.default : [m.default]).flat(1)

export default routes
